package com.woniuxy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Goods implements Serializable {
    private Integer id; //主键id
    private String name; //商品名称
    private String description; //商品描述
    private Integer typeFirstId; //一级类别id
    private Integer typeSecondId; //二级类别id
    private String brand; //品牌
    private Integer size; //商品规格
    private Integer unitId; //规格计量单位id
    private Integer storeConditionId; //存储条件id
    private BigDecimal originPrice; //原价
    private BigDecimal price; //现价
    private Integer recommend; //是否主页推荐, 0.不推荐, 1.推荐
    private String reason; //推荐理由
    private String imgSrc; //商品图片
    private Integer status; //商品状态, 0.下架, 1.上架
    private Integer stock; //库存
    private Integer discount; //是否参加打折活动, 0.否, 1.是

    // 关联表字段(非数据库直接字段)
    private String typeFirstName;  // 一级分类名称
    private String typeSecondName; // 二级分类名称
    private String unitName;       // 单位名称
    private String storeConditionName; // 存储条件名称
    private BigDecimal priceMin; //前端传来的现价最小值
    private BigDecimal priceMax; //前端传来的现价最大值
    private BigDecimal originPriceMin; //前端传来的现价最小值
    private BigDecimal originPriceMax; //前端传来的现价最大值

}
